; Set up assigns etc. both for users booting from the CD and from HD
;
; Version 1.1 - Changed jpegtmp
;
; Version 1.2 - Added uninit option
;
; Version 1.3 - Added CHECK argument and link to Prefs editor
Assign CUCD: :
; Make some commands resident to speed up things on CD32s in particular
Resident >NIL: CUCD:C/RequestChoice PURE
Resident >NIL: CUCD:rexxc/rx PURE
Resident >NIL: CUCD:C/Version PURE
If {arg} EQ "CHECK" ; Exit if InitCD has been run, otherwise ask
If $CDInit EQ TRUE
Skip END
Else
set init `CUCD:C/RequestChoice "CU Amiga CD" "InitCD needs to be run first*NWould you like to run it now?" "Yes|No"`
If $init EQ 0
Skip END
EndIf
EndIf
EndIf
If $CDInit EQ TRUE
If $CDBoot EQ TRUE ; don't run UninitCD if booted from CD
CUCD:C/RequestChoice >NIL: "CU Amiga CD" "You do not need to run InitCD*Nwhen you have booted from the CD" "OK"
Skip END
EndIf
set remass `CUCD:C/RequestChoice "InitCD" "You have already run InitCD once.*NDo you wish to remove the assigns and paths added before?" "Remove|Cancel"`
If $remass EQ 1
execute UnInitCD
EndIf
Skip END
EndIf
; Set some system assigns
Assign WWW: CUCD:CUCD/WWW
Assign tcpdldir: CUCD:CUCD/WWW
Assign GM: CUCD:CDsupport/GMPlay ADD
Assign CUCDNews: CUCD:CUCD/Online/News
Assign Twist: CUCD:CUCD/Magazine/Issues
Assign TwistIcon: Twist:Icons
; Add paths
Path GM: ADD
; Add MUI if no MUI installed.
Assign MUI: EXISTS >NIL:
IF WARN
Assign MUI: CUCD:CDsupport/MUI
Assign Libs: MUI:Libs ADD
Assign LOCALE: MUI:Locale ADD
Assign HELP: exists >NIL:
If NOT WARN
Dir >NIL: HELP:
EndIf
Assign HELP: MUI:Docs ADD
Else
:C/UpdateCopy >NIL: CUCD:CDsupport/MUI/Libs/MUI/Icon.mcc MUI:Libs/MUI CLONE DEEP
EndIf
; Set assigns and paths for programs on this CD
Execute CUCD:S/ThisCD
;BEGIN ClassAct
CUCD:C/CAPrefs >NIL:
;END ClassAct
; start arexx if not running
CUCD:rexxc/rx "address command" >NIL:
If WARN
CUCD:System/RexxMast >NIL:
EndIf
IF $CDBoot EQ TRUE
Run <NIL: >NIL: CUCD:C/NewIcons
CUCD:C/DefIcons
Else
; All this is only needed when not booting from the CD
Run >NIL: RequestChoice "InitCD" "Setting up some assigns and paths to run software from the CD.*NIf you wish to remove the CD from the drive, run InitCD again,*Notherwise the icon will stay on the Workbench." " OK "
set edit `RequestChoice "CU Amiga CD" "CUCD now has a preferences program to specify*N the tools used to view/hear different types of files.*NWould you like to run it now?" "Yes|No"`
If $edit EQ 1
cd CUCD:S
:RexxC/MuiRexx CUCDPrefs.mrx port CDPREFS
else
RequestChoice >NIL: "CU Amiga CD" "You can run CUCD preferences at any time.*NIt is in the Prefs drawer of the CD" "OK"